<?php $this->load->view('admin/header_layout'); ?>


<link rel="stylesheet" href="<?php echo base_url(); ?>/documents-dated/css/reset-sambo.css"/>
<link rel="stylesheet" href="<?php echo base_url(); ?>/css-dated/BeatPicker.min.css"/>
<link rel="stylesheet" href="<?php echo base_url(); ?>/documents-dated/css/prism-sambo.css"/>
<script src="<?php echo base_url(); ?>/js-dated/jquery-1.11.0.min.js"></script>
<script src="<?php echo base_url(); ?>/js-dated/BeatPicker.min.js"></script>
<script src="<?php echo base_url(); ?>/documents-dated/js/prism-sambo.js"></script>



<div class="content-inner">
    <div class="marg20-btm">
        <a href="<?php echo site_url('threads/allthreads'); ?>" class="btn btn-primary">&hearts; View All </a>
    </div>
    <form action="<?php echo site_url('threads/add_new'); ?>" method="post" class="form-horizontal" />
    <?php
    $topic = array(
        'name' => 'topic',
        'value' => set_value('topic_title'),
        'id' => 'input01',
        'require' => '',
        'class' => 'input-xlarge'
    );
    $title = array(
        'name' => 'th_title',
        'value' => set_value('thread_title'),
        'id' => 'input01',
        'required' => '',
        'placeholder' => 'Title...',
        'class' => 'input-xlarge'
    );
    $content = array(
        'name' => 'th_content',
        'value' => set_value('thread_content'),
        'id' => 'input01',
        'required' => '',
        'placeholder' => 'Content...',
        'class' => 'input-xlarge'
    );
    $publish_dated = array(
        'name' => 'publish_dated',
        'value' => set_value('username'),
        'id' => 'input01',
        'required' => '',
        'placeholder' => 'Publish Date...',
        'class' => 'input-xlarge'
    );

    $author = array(
        '' => '---Select Author---',
        '1' => 'Administrator',
        '2' => 'Simple User'
    );

    $status = array(
        '' => '---select status---',
        '1' => 'Approved',
        '0' => 'Disapproved'
    );
    ?>

    <div class="control-group">

        <?php
        echo '<div class="controls">
		   <span style="color:red; margin-left:12px;">' . validation_errors('&times;') . '</span>
		   </div>';
        ?>

        <div class="control-group">
            <label class="control-label">Choose topic</label>
            <div class="controls">
                <?php form_dropdown('topic', $topic); ?>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="input01">Title </label>
            <div class="controls">
                <?php echo form_input($title); ?>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="input01">Content </label>
            <div class="controls">
                <?php echo form_textarea($content); ?>
            </div>
        </div>
        <label class="control-label" for="input01">Published </label>
        <div class="controls">
            <input type="text" data-beatpicker="true" name="th_dated" />
            <?php //echo form_input($publish_dated); ?>
        </div>
    </div>

    <div class="control-group">
        <label class="control-label" for="input01">Author </label>
        <div class="controls">
            <?php echo form_dropdown('th_author', $author); ?>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="input01">Status </label>
        <div class="controls">
            <?php echo form_dropdown('th_status', $status); ?>
        </div>
    </div>
    <div class="form-actions">
        <button type="submit" class="btn btn-primary">Save </button>
        <a href="" class="btn">Cancel </a>
    </div>
</form> 